package simple03;

import simple03.bag.Bag;
import simple03.factory.BananaFactory;
import simple03.factory.FruitFactory;
import simple03.fruit.Fruit;

//抽象工厂模式
public class Simple {

    public static void main(String[] args) {
        FruitFactory fruitFactory = new BananaFactory();
        Fruit fruit = ((BananaFactory) fruitFactory).getFruit();
        fruit.fruit();

        Bag bag = ((BananaFactory) fruitFactory).getBag();
        bag.getBag();


    }
}
